package com.yxq.mdt.app.modules.socialcontact.presenter;

import com.yxq.mdt.app.base.BasePresenter;
import com.yxq.mdt.app.modules.socialcontact.bean.VideoTopicBean;
import com.yxq.mdt.app.modules.socialcontact.model.MainSocialContactModel;
import com.yxq.mdt.app.net.ApiModel;

public class MainSocialVideoPresenter extends BasePresenter<MainSocialVideoContract.View, MainSocialContactModel> implements MainSocialVideoContract.Presenter {
    /**
     * 如果当前页面同时需要 Model 层和 View 层,则使用此构造函数(默认)
     *
     * @param rootView
     * @param model
     */
    public MainSocialVideoPresenter(MainSocialVideoContract.View rootView, MainSocialContactModel model) {
        super(rootView, model);
    }


    @Override
    public void getVideoTopic(int pageNum, int pageSize, String userId) {
        mBaseModel.getVideoTopic(pageNum, pageSize, userId, new ApiModel.CommonCallback<VideoTopicBean>() {
            @Override
            public void onSuccess(VideoTopicBean videoTopicBean) {
                mRootView.onLoadVideoTopicTopicSuccess(videoTopicBean);
            }

            @Override
            public void onError(String errMsg) {
                mRootView.onLoadVideoTopicTopicFailed();
            }
        });
    }
}
